<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/static/s.css">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <!--     style="background-image: url('/static/nav_bg.png'); background-size: 100% 100%; height: 100px;"-->
    <div class="container">
        <a class="navbar-brand" href="#">撞破南墙找西墙</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto">
                <li class="nav-item">
                    <a class="nav-link" href="/">首页</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/wall">墙</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/send">发墙</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/news">通知</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/me">我的</a>
                </li>
            </ul>
            <form class="d-flex">
                <input class="form-control me-2 input-orange" type="search" placeholder="Search" aria-label="Search">
            </form>
            <div class="dropdown" style="margin: 10px;">
                <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" id="dropdownUser1"
                   data-bs-toggle="dropdown" aria-expanded="false">
                    <img src="../static/headimg.jpg" alt="mdo" width="40" height="40" class="rounded-circle">
                </a>
                <ul class="dropdown-menu text-small" aria-labelledby="dropdownUser1">
                    <li><a class="dropdown-item" href="#">Legend.</a></li>
                    <li><a class="dropdown-item" href="#">我的投稿</a></li>
                    <li><a class="dropdown-item" href="#">反馈&留言</a></li>
                    <li><a class="dropdown-item" href="#">个人设置</a></li>
                    <li>
                        <hr class="dropdown-divider">
                    </li>
                    <li><a class="dropdown-item" href="#">退出登录</a></li>
                </ul>
            </div>
        </div>
    </div>
</nav>

<br>

<div class="container mt-3">
        <div class="dynamic-card">
            <div class="card card-fad0c4">
                <div class="d-flex justify-content-between align-items-center" style="padding: 5px;">
                    <div>
                        {% if i['type'] == 'anonymous' %}
                        <img src="/static/userheader.svg" class="rounded-circle" style="margin: 5px;" width="60">
                        <font size="5px">匿名用户</font>
                        {% else %}
                        <img src="{{ i['head'] }}" class="rounded-circle" style="margin: 5px;" width="60">
                        <font size="5px">{{ i['name'] }}</font>
                        {% endif %}
                    </div>
                    <div>
                        <small class="text-muted">{{ i['time'] }}</small>
                    </div>
                </div>
                <div class="card-body">
                    <p>{{ i['content'] }}</p>
                    {% if i['img'] %}
                    <a href="/uploads/{{ i['img'] }}" target="_blank"><img src="/uploads/{{ i['img'] }}" width="200px" height="150px" class="img-fluid mt-3"></a>
                    {% endif %}
                    <br><a href="/messages?mid={{ i['mid'] }}"><button type="submit" class="btn btn-ff9933">评论</button></a>
                </div>
    <!--            <a href="/messages?mid={{ i['mid'] }}"><button type="button" class="btn bottom_btn">评论</button></a>-->
            </div>
</div>


{% endfor %}
<br><br>
<ul class="pagination justify-content-center">
    {% if page == 1 %}
    <li class="page-item disabled"><a class="page-link">首页</a></li>
    <li class="page-item disabled"><a class="page-link">上一页</a></li>
    {% else %}
    <li class="page-item"><a class="page-link" href="/wall">首页</a></li>
    <li class="page-item"><a class="page-link" href="/wall?page={{ page - 1 }}">上一页</a></li>
    {% endif %}
    <li class="page-item active"><a class="page-link" href="#">{{ page }}</a></li>
    {% if page == page_num %}
    <li class="page-item disabled"><a class="page-link">下一页</a></li>
    {% else %}
    <li class="page-item"><a class="page-link" href="/wall?page={{ page + 1 }}">下一页</a></li>
    {% endif %}
</ul>

<br><br><br><br><br>
</div>
<script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>

</body>
</html>